<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>BlueShoes JavaScript: Bs_FormFieldSelect example</title>

<script type="text/javascript" src="/_bsJavascript/core/form/Bs_FormFieldSelect.class.js"></script>
<script>
function init() {
  myField = document.getElementById('foo')
  var t = new Bs_FormFieldSelect();
  t.init(myField);
}
</script>

</head>

<body onLoad="init();">

<form name="myForm">
  <select name="foo" id="foo" size="10" multiple style="font-family:courier,lucida console;">
    <option value="b">bb</option>
    <option value="d">dddd</option>
    <option value="a">a</option>
    <option value="e">eeeee</option>
    <option value="g">ggggggg</option>
    <option value="c">ccc</option>
    <option value="f">ffffff</option>
  </select>
</form>

<button name="sort" onClick="myField.sortByText();">Sort Asc</button>
<button name="sort" onClick="myField.sortByText(true);">Sort Desc</button>

</body>
</html>
